/* Worldstream Keycloak login chrome (auth.worldstream.com): Gellix, logos, cyprus/polar/yellow. */
@font-face {
  font-family: Gellix;
  src: url("gellix.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --cyprus: #003340;
  --polar: #def7f7;
  --morning: #94e2dd;
  --cerulean: #0096d0;
  --yellow: #ffc836;
  --ink: #003340;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--polar);
  color: var(--ink);
  font-family: Gellix, Century Gothic, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.mono {
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.skip {
  position: absolute;
  left: -9999px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--yellow);
  color: var(--cyprus);
  border-radius: 999px;
}

.site-header {
  background: var(--cyprus);
  color: var(--polar);
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 94.5rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
}

.header-logo {
  display: block;
  width: 13rem;
  max-width: 100%;
  height: auto;
}

.nav-polar {
  height: 0.35rem;
  background: var(--polar);
}

.bar-extra {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.bar-extra:empty { display: none; }

.admin-nav {
  display: flex;
  gap: 0.75rem;
  margin-right: 0.5rem;
}

.admin-nav a {
  color: var(--polar);
  font-size: 0.9rem;
  font-weight: 600;
}
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--cyprus);
  font-size: 0.8rem;
  font-weight: 600;
}

.app-version {
  font-size: 0.8rem;
  color: var(--morning);
  opacity: 0.9;
}

.page {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  width: 100%;
  background: #fff;
  padding: 2.5rem 1.5rem 3rem;
}

body.center-form .page {
  align-items: flex-start;
  padding-top: 3.5rem;
}

.sheet {
  width: 100%;
  max-width: 26rem;
}

body:not(.center-form) .sheet {
  max-width: 40rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 500;
}

h2 {
  font-size: 1.05rem;
  margin-top: 2rem;
}

p { margin: 0 0 1rem; }

a {
  color: var(--cyprus);
  font-weight: 500;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.hint {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.disk {
  margin: 0.35rem 0 0.5rem;
}

.disk-bar {
  display: block;
  width: 100%;
  height: 0.5rem;
  margin: 0 0 1.25rem;
  accent-color: var(--cyprus);
}

label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.tip {
  position: relative;
  display: inline-block;
  margin-left: 0.35rem;
  font-weight: 400;
}

.tip-btn {
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 1px solid var(--cyprus);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--cyprus);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: help;
}

.tip-box {
  display: none;
  position: absolute;
  left: 0;
  top: 1.6rem;
  z-index: 2;
  width: 18rem;
  padding: 0.75rem 0.9rem;
  background: var(--cyprus);
  color: var(--polar);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
}

.tip:hover .tip-box,
.tip:focus-within .tip-box {
  display: block;
}

.tip-box .mono {
  display: block;
  margin-top: 0.4rem;
  color: var(--yellow);
  overflow-wrap: anywhere;
}

input[type="email"],
input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--cyprus);
  border-radius: 999px;
  background: var(--polar);
  color: var(--ink);
  font: inherit;
}

textarea {
  border-radius: 1rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--cerulean);
  outline-offset: 1px;
}

.pw-wrap {
  position: relative;
}

.pw-wrap input,
.pw-wrap .pw-value {
  width: 100%;
  padding-right: 2.75rem;
  box-sizing: border-box;
}

.pw-wrap .pw-value {
  display: block;
  min-height: 2.6rem;
  padding: 0.65rem 2.75rem 0.65rem 1.1rem;
  border: 1px solid var(--cyprus);
  border-radius: 999px;
  background: var(--polar);
  overflow-wrap: anywhere;
}

.look-btn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cyprus);
  cursor: pointer;
  transform: translateY(-50%);
}

.look-btn:hover,
.look-btn:focus {
  background: var(--polar);
}

.look-btn .eye-shut {
  display: none;
}

.look-btn[aria-pressed="true"] .eye-open {
  display: none;
}

.look-btn[aria-pressed="true"] .eye-shut {
  display: block;
}

.btn {
  margin-top: 0.85rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--yellow);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--cyprus);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { background: var(--morning); border-color: var(--morning); }

.btn-ghost {
  background: transparent;
  border-color: var(--cyprus);
}

.kind-slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  margin: 1.25rem 0;
  padding: 0.2rem;
  border: 1px solid var(--cyprus);
  border-radius: 999px;
  background: var(--polar);
}

.kind-slide label {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
}

.kind-slide input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.kind-slide label:has(input:checked) {
  background: var(--yellow);
}

.kind .pane-cred { display: none; }

.kind:has(input[value="credentials"]:checked) .pane-files { display: none; }

.kind:has(input[value="credentials"]:checked) .pane-cred { display: block; }

.kind .pane-files .disk {
  margin-top: 0.75rem;
}

.kind .pane-files .disk-bar {
  margin-bottom: 0.75rem;
}

input[type="file"] {
  width: 100%;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--cyprus);
  border-radius: 999px;
  background: var(--polar);
  color: var(--ink);
  font: inherit;
}

.files {
  list-style: none;
  margin: 0;
  padding: 0;
}

.files li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--polar);
}

.files .fname {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.files .fsize {
  font-size: 0.85rem;
  opacity: 0.7;
  white-space: nowrap;
}

.files .btn { margin-top: 0; }

.files form { margin: 0; }

.creds {
  margin: 0;
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.4rem 1rem;
}

.creds dt { font-weight: 600; }

.creds dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.flash {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem 0.75rem 2rem;
  border-radius: 0.75rem;
  background: var(--polar);
  font-size: 0.9rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 51, 64, 0.55);
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(28rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  padding: 1.25rem 1.35rem 1.5rem;
  border-radius: 1rem;
  background: #fff;
  color: var(--cyprus);
}

.cred-field {
  margin: 0.85rem 0;
}

.cred-field .hint {
  display: block;
  margin-bottom: 0.25rem;
}

.cred-field .mono {
  display: block;
  overflow-wrap: anywhere;
}

pre {
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: var(--cyprus);
  color: var(--polar);
  font-size: 0.8rem;
  overflow-x: auto;
}

.site-footer {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--cyprus);
  background: #fff;
  opacity: 0.75;
}
