* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 48%, rgba(13, 77, 61, 0.92), transparent 34rem),
    linear-gradient(135deg, #021b15 0%, #043428 46%, #021a14 100%);
  color: #fffaf0;
  font-family: Arial, Helvetica, sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.watermark {
  pointer-events: none;
  position: fixed;
  right: -140px;
  top: 50%;
  z-index: 0;
  width: min(78vw, 1020px);
  height: auto;
  max-width: none;
  opacity: 0.24;
  transform: translateY(-50%);
  filter: saturate(1.05);
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 18px clamp(20px, 5vw, 64px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 5;
}

.topbar-brand {
  color: #e6c57a;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar nav {
  align-items: center;
  display: flex;
  gap: 14px;
}

.topbar a,
.topbar button {
  background: rgba(245, 239, 226, 0.1);
  border: 1px solid rgba(229, 190, 104, 0.3);
  border-radius: 999px;
  color: #fffaf0;
  cursor: pointer;
  padding: 10px 14px;
}

.topbar form {
  margin: 0;
}

.login-shell,
.access-shell,
.config-shell {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.login-shell {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  padding: 40px clamp(20px, 10vw, 140px);
}

.login-card,
.panel {
  background: rgba(245, 239, 226, 0.95);
  border: 1px solid rgba(229, 190, 104, 0.36);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
  color: #062c23;
}

.login-card {
  max-width: 460px;
  padding: 32px;
  width: 100%;
}

.line {
  background: #d7a64c;
  height: 1px;
  margin-bottom: 20px;
  width: 96px;
}

.eyebrow {
  color: #b6812f;
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: #ffffff;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  margin-bottom: 14px;
}

.login-card h1,
.panel h2,
.panel h3 {
  color: #062c23;
}

.muted,
.subtitle {
  color: #d8e2db;
  line-height: 1.65;
}

.login-card .muted {
  color: #53645e;
}

.form,
.grid-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

input,
select {
  background: #fffaf0;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  color: #062c23;
  min-height: 46px;
  padding: 10px 12px;
}

.primary,
.secondary,
.danger {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 11px 18px;
}

.primary {
  background: linear-gradient(135deg, #dba846 0%, #f1cf7b 100%);
  color: #062c23;
}

.secondary {
  background: #062c23;
  color: #fffaf0;
}

.danger {
  background: #742b2b;
  color: #fffaf0;
}

.small-link {
  color: #062c23;
  display: inline-block;
  font-weight: 800;
  margin-top: 18px;
}

.notice {
  border-radius: 8px;
  margin: 14px 0;
  padding: 12px 14px;
}

.notice.success {
  background: #dff4df;
  color: #164216;
}

.notice.error {
  background: #ffe1df;
  color: #742b2b;
}

.access-shell {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 32px 40px;
}

.access-content {
  margin-left: clamp(0px, 7vw, 128px);
  width: min(100%, 610px);
}

.intro {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-bottom: 34px;
  text-align: left;
}

.project-list {
  display: grid;
  gap: 18px;
  width: 100%;
}

.project-link {
  align-items: center;
  background: rgba(245, 239, 226, 0.95);
  border: 1px solid rgba(229, 190, 104, 0.36);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  color: #062c23;
  display: grid;
  gap: 18px;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  min-height: 144px;
  padding: 16px 18px;
}

.project-link:hover,
.project-link:focus-visible {
  background: #fffaf0;
  border-color: rgba(229, 190, 104, 0.92);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.36);
  outline: none;
  transform: translateY(-3px);
}

.logo-frame {
  background: #020f0c;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(229, 190, 104, 0.5),
    0 12px 26px rgba(0, 0, 0, 0.18);
  display: grid;
  height: 108px;
  overflow: hidden;
  place-items: center;
  width: 118px;
}

.project-logo {
  display: block;
  max-height: 92px;
  object-fit: contain;
}

.project-logo-square {
  width: 98px;
}

.project-logo-wide {
  padding: 6px;
  width: 112px;
}

.project-copy {
  display: grid;
  gap: 6px;
}

.project-name {
  font-size: 18px;
  font-weight: 800;
}

.project-description {
  color: #53645e;
  font-size: 15px;
  line-height: 1.45;
}

.access-button {
  background: linear-gradient(135deg, #dba846 0%, #f1cf7b 100%);
  border-radius: 999px;
  color: #062c23;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 16px;
}

footer {
  color: #b9c7c0;
  margin-top: 40px;
}

.config-shell {
  padding: 96px clamp(20px, 5vw, 72px) 56px;
}

.config-content {
  margin: 0 auto;
  max-width: 1080px;
  position: relative;
  z-index: 1;
}

.panel {
  margin-top: 20px;
  padding: 24px;
}

.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-checks {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
}

.check {
  align-items: center;
  display: flex;
  flex-direction: row;
  font-weight: 700;
  gap: 8px;
}

.check input {
  min-height: auto;
}

.users-list {
  display: grid;
  gap: 12px;
}

.user-row {
  background: #fffaf0;
  border: 1px solid #d9caa8;
  border-radius: 8px;
  padding: 14px;
}

.user-row summary {
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.user-row form {
  margin-top: 16px;
}

code {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 3px 6px;
}

@media (max-width: 720px) {
  .watermark {
    opacity: 0.15;
    right: -44vw;
    width: 150vw;
  }

  .topbar {
    position: relative;
  }

  .login-shell,
  .access-shell,
  .config-shell {
    padding: 32px 20px;
  }

  .access-content {
    margin-left: 0;
  }

  .project-link {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .access-button {
    grid-column: 1 / -1;
    text-align: center;
  }

  .logo-frame {
    height: 88px;
    width: 92px;
  }

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