:root {
  --bg: #f5f6f2;
  --ink: #172e29;
  --muted: #6f7c76;
  --line: #dfe6df;
  --accent: #1d6755;
  --light: #e9f1e9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    sans-serif;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #98bfb2;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
header {
  max-width: 1360px;
  margin: auto;
  padding: 32px 54px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -1px;
}
.brand span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-left: 1px solid #ccd8cf;
  padding-left: 14px;
}
.header-note {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
main {
  max-width: 1248px;
  margin: auto;
  padding: 20px 48px 50px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 80px;
  align-items: center;
  min-height: calc(100vh - 235px);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--accent);
}
h1 {
  font-size: clamp(36px, 4.3vw, 58px);
  line-height: 1.35;
  letter-spacing: -2px;
  font-weight: 600;
  margin: 23px 0;
}
.dot {
  color: #4c8a69;
}
.intro > p {
  color: var(--muted);
  line-height: 2;
}
.assurance {
  margin-top: 70px;
  font-size: 12px;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4e9170;
  margin-right: 10px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 22px;
  box-shadow: 0 8px 35px #243e2804;
}
.login-card {
  padding: 34px;
  margin: 0;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.key-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--light);
  font-size: 26px;
  color: var(--accent);
}
h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 15px 0 8px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 20px;
}
.tabs {
  display: flex;
  padding: 4px;
  background: #f3f5f1;
  border-radius: 10px;
  margin: 25px 0 20px;
}
.tabs button {
  flex: 1;
  border: 0;
  padding: 9px 4px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  border-radius: 7px;
}
.tabs .selected {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 6px #203b2210;
}
.passkey-icon {
  width: 78px;
  height: 78px;
  background: #f2f6f0;
  border: 1px solid var(--line);
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 37px;
  margin: 30px auto 20px;
  color: var(--accent);
}
.key-description {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 14px 0;
}
input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px 13px;
  background: #fafbf9;
  color: var(--ink);
  margin-top: 7px;
  outline: none;
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #1d675510;
}
.primary {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
}
.primary:hover {
  background: #145442;
}
#login-submit {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.secondary {
  border: 1px solid var(--line);
  background: #f9fbf7;
  border-radius: 8px;
  padding: 8px 13px;
  color: var(--ink);
  font-size: 12px;
}
.quiet {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  padding: 8px;
}
.footnote {
  font-size: 11px;
  color: #849087;
  margin: 20px 0 0;
  line-height: 1.8;
}
.login-card > .footnote {
  text-align: center;
}
.captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.captcha-row img {
  width: 200px;
  max-width: 75%;
  height: auto;
  margin-top: 7px;
  border-radius: 8px;
}
footer {
  max-width: 1248px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 22px 48px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #879388;
  display: flex;
  justify-content: space-between;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}
.account-title {
  font-size: 34px;
  letter-spacing: -1px;
  margin: 12px 0;
}
.badge {
  padding: 6px 15px;
  border-radius: 30px;
  background: var(--light);
  color: var(--accent);
  font-size: 12px;
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 12px 0 28px;
}
.app-link {
  padding: 22px;
  border: 1px solid var(--line);
  background: #edf3e9;
  border-radius: 15px;
  transition: transform 0.15s;
}
.app-link:hover {
  transform: translateY(-2px);
}
.app-link strong {
  display: block;
  font-size: 17px;
}
.app-link small {
  color: var(--muted);
  font-size: 12px;
}
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.section-head h2 {
  margin-top: 0;
}
.button-row {
  display: flex;
  gap: 10px;
  margin: 20px 0 0;
  flex-wrap: wrap;
}
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #edf0eb;
}
.item:last-child {
  border: 0;
}
.item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 10px;
  border-bottom: 1px solid #edf0eb;
  vertical-align: top;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  max-width: 300px;
  overflow-wrap: anywhere;
}
.success {
  color: var(--accent);
}
.failure {
  color: #b44c3e;
}
code {
  font-size: 11px;
  overflow-wrap: anywhere;
}
details {
  margin-top: 24px;
  font-size: 12px;
}
summary {
  cursor: pointer;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  max-width: 500px;
  width: calc(100% - 36px);
  color: var(--ink);
}
dialog::backdrop {
  background: #142b2450;
  backdrop-filter: blur(4px);
}
pre {
  white-space: pre-wrap;
  background: var(--bg);
  padding: 18px;
  border-radius: 10px;
  font-size: 12px;
  user-select: all;
}
#notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #173e32;
  color: #fff;
  border-radius: 12px;
  padding: 14px 24px;
  max-width: 90vw;
  box-shadow: 0 5px 24px #173e3240;
  font-size: 13px;
  z-index: 10;
}
@media (max-width: 900px) {
  .login-layout {
    gap: 30px;
    grid-template-columns: 1fr 390px;
  }
  .assurance {
    margin-top: 35px;
  }
  main {
    padding: 10px 25px 40px;
  }
  header {
    padding: 24px 25px;
  }
  .security-grid {
    grid-template-columns: 1fr;
  }
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .login-layout {
    display: block;
  }
  .intro {
    padding: 25px 5px;
  }
  .intro h1 {
    font-size: 36px;
  }
  .intro p {
    font-size: 13px;
  }
  .assurance {
    display: none;
  }
  .login-card {
    padding: 26px;
  }
  footer {
    padding: 20px 25px;
    margin-top: 12px;
  }
  .header-note {
    display: none;
  }
  .brand {
    margin-right: auto;
  }
  .app-grid {
    grid-template-columns: 1fr;
  }
  .account-title {
    font-size: 27px;
  }
  .page-heading {
    gap: 15px;
  }
  .card {
    padding: 23px;
  }
  footer span {
    display: none;
  }
}

/* Public sign-in page. Account management keeps its own layout. */
body:not(.login-page) .login-scenery,
body:not(.login-page) .login-masthead,
body:not(.login-page) .login-legal {
  display: none;
}
.login-page {
  --accent: #2d65b3;
  --ink: #23384e;
  --muted: #788594;
  --line: #dbe3ed;
  --light: #edf3fb;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: #7c6a73;
}
.login-scenery {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.login-scenery picture,
.login-scenery img {
  display: block;
  width: 100%;
  height: 100%;
}
.login-scenery img {
  object-fit: cover;
  object-position: center 56%;
}
.login-scenery::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 31, 51, 0.04) 30%, rgba(14, 31, 51, 0.14)),
    linear-gradient(0deg, rgba(13, 29, 47, 0.2), transparent 34%);
}
.login-masthead {
  width: 100%;
  max-width: none;
  min-height: 94px;
  margin: 0;
  padding: 21px clamp(28px, 6vw, 112px);
  background: rgba(18, 48, 79, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
}
.campus-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #fff;
}
.campus-brand img {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.65);
}
.brand-name {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: 0.3px;
}
.brand-divider {
  width: 1px;
  height: 29px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.3);
}
.brand-caption {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 1px;
}
.login-page main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: end;
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 44px clamp(28px, 6vw, 112px);
}
.campus-login {
  width: 440px;
  max-width: 100%;
}
.login-frame {
  padding: 10px;
  background: rgba(255, 255, 255, 0.27);
  border-radius: 10px;
  box-shadow: 0 18px 64px rgba(12, 27, 42, 0.16);
}
.campus-login .login-card {
  margin: 0;
  padding: 35px 34px 34px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}
.campus-login h1 {
  margin: 0 0 10px;
  color: #2b496b;
  font-size: 24px;
  font-weight: 550;
  line-height: 1.4;
  letter-spacing: 0.1px;
}
.login-prompt {
  margin: 0 0 25px;
  font-size: 13px;
  color: #7d8792;
  line-height: 1.8;
}
.campus-login .tabs {
  padding: 0;
  margin: 0 0 19px;
  border-bottom: 1px solid #e5eaf0;
  border-radius: 0;
  background: transparent;
  gap: 20px;
}
.campus-login .tabs button {
  position: relative;
  border-radius: 0;
  padding: 13px 0;
  color: #8b929b;
  font-size: 14px;
  line-height: 1.5;
}
.campus-login .tabs .selected {
  color: var(--accent);
  font-weight: 600;
  background: transparent;
  box-shadow: none;
}
.campus-login .tabs .selected::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
  bottom: -1px;
  background: var(--accent);
}
.campus-login #key-panel {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 0 8px;
}
.device-key-mark {
  width: 64px;
  height: 64px;
  color: #4b78b0;
}
.campus-login #key-panel p {
  margin: 0;
  color: #8a939d;
  font-size: 13px;
}
.campus-login label {
  margin: 17px 0;
  font-size: 12px;
  color: #7b8795;
  font-weight: 400;
}
.campus-login input {
  margin-top: 3px;
  padding: 9px 0 10px;
  font-size: 15px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #ced7e1;
  border-radius: 0;
  color: #35485d;
}
.campus-login input::placeholder {
  color: #a7afb8;
  font-size: 13px;
}
.campus-login input:focus {
  border-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
}
.campus-login #login-submit {
  display: block;
  width: 100%;
  margin-top: 23px;
  min-height: 47px;
  padding: 12px 14px;
  border-radius: 4px;
  background: #2d65b3;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background 0.15s;
}
.campus-login #login-submit:hover {
  background: #245696;
}
.login-page button:focus-visible,
.login-page a:focus-visible {
  outline-color: #9dbff0;
}
.login-page #notice {
  background: #203e60;
}
.login-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  min-height: 52px;
  margin: 0;
  padding: 15px 24px;
  border: 0;
  background: rgba(16, 40, 65, 0.9);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  letter-spacing: 0.3px;
}
.login-legal a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (min-width: 681px) and (max-height: 800px) {
  .login-masthead {
    min-height: 82px;
    padding-top: 17px;
    padding-bottom: 17px;
  }
  .login-page main {
    padding-top: 26px;
    padding-bottom: 26px;
  }
  .campus-login .login-card {
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .campus-login label {
    margin: 12px 0;
  }
  .campus-login #key-panel {
    min-height: 110px;
  }
  .login-legal {
    min-height: 46px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}
@media (max-width: 680px) {
  .login-masthead {
    min-height: 79px;
    padding: 18px 23px;
  }
  .campus-brand {
    gap: 11px;
  }
  .campus-brand img {
    width: 39px;
    height: 39px;
  }
  .brand-name {
    font-size: 23px;
  }
  .brand-divider {
    height: 23px;
    margin: 0 2px;
  }
  .brand-caption {
    font-size: 16px;
    letter-spacing: 0;
  }
  .login-page main {
    justify-items: center;
    padding: 30px 20px;
  }
  .login-frame {
    padding: 7px;
  }
  .campus-login .login-card {
    padding: 30px 25px;
  }
  .campus-login h1 {
    font-size: 22px;
  }
  .login-prompt {
    font-size: 12px;
  }
  .login-scenery img {
    object-position: 70% center;
  }
  .login-legal {
    min-height: 48px;
    padding: 14px 18px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .campus-login #login-submit {
    transition: none;
  }
}
#dialog-qr {
  display: block;
  width: 200px;
  max-width: 100%;
  margin: 12px auto;
}

/* Application registration stays compact on both desktop and mobile. */
#client-section .muted {
  margin-bottom: 0;
}
.client-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.client-item:last-child {
  border-bottom: 0;
}
.client-info {
  min-width: 0;
}
.client-info code,
.client-info small {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.client-info small {
  color: var(--muted);
  font-size: 12px;
}
.client-state {
  margin-left: 12px;
  font-size: 11px;
  color: var(--muted);
}
.client-actions {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 2px;
}
.endpoint-list {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  line-height: 1.5;
}
.endpoint-list dt {
  color: var(--muted);
}
.endpoint-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  user-select: all;
}
#client-dialog {
  max-width: 560px;
  max-height: 90dvh;
  overflow-y: auto;
}
#client-dialog textarea,
#client-dialog select {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  margin-top: 7px;
  background: #fafbf9;
  color: var(--ink);
  font: inherit;
}
#client-dialog textarea {
  resize: vertical;
  line-height: 1.6;
}
#client-dialog textarea:focus,
#client-dialog select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check-label input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.field-help {
  color: var(--muted);
  font-size: 11px;
  margin: -5px 0 18px;
  line-height: 1.7;
}
#dialog-output {
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  .client-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .client-actions {
    margin-left: -8px;
  }
  #client-section .section-head {
    align-items: flex-start;
  }
  #client-section .section-head > button {
    white-space: nowrap;
  }
}

.settings-dialog {
  max-width: 600px;
  max-height: 90dvh;
  overflow-y: auto;
}
.settings-dialog select {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  margin-top: 7px;
  background: #fafbf9;
  color: var(--ink);
  font: inherit;
}
.settings-dialog select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.bypass-rule {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 14px 0;
  padding: 16px;
  min-width: 0;
  background: #fafbf9;
}
.bypass-rule .section-head {
  font-size: 13px;
}
.rule-heading {
  margin: 26px 0 12px;
}
.rule-heading h3 {
  font-size: 15px;
  margin: 0;
}
.method-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.method-options label {
  font-size: 11px;
  margin: 8px 0;
}
#gateway-section .section-head,
#waf-section .section-head {
  align-items: flex-start;
}
#gateway-section .section-head > button,
#waf-section .section-head > button {
  white-space: nowrap;
}
#waf-address {
  overflow-wrap: anywhere;
  margin: 0;
}

.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
#app-dialog label {
  margin: 10px 0;
}
#app-dialog .footnote {
  margin-top: 14px;
}
#app-dialog .rule-heading {
  margin-top: 20px;
}
@media (max-width: 520px) {
  .field-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
