:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  background: #07111f;
  color: #eef4ff;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.20), transparent 34%),
    radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.17), transparent 32%),
    linear-gradient(145deg, #07111f, #10172b 58%, #091322);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.card {
  width: min(1020px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  background: rgba(9, 18, 35, 0.86);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
}

.login-card {
  width: min(520px, 100%);
  padding: 42px;
}

.brand h1,
.portal-header h1 {
  margin: 16px 0 10px;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.055em;
}

.brand p,
.portal-header p,
.notice {
  color: #9eacc2;
  line-height: 1.65;
}

.badge {
  display: inline-flex;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.09);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

label {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  color: #d8e2f1;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #cbd5e1 50%),
    linear-gradient(135deg, #cbd5e1 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

.admin-password-options.is-hidden {
  display: none;
}

.email-choice {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
}

.email-choice input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: #f59e0b;
}

button {
  width: 100%;
  margin-top: 22px;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.error {
  min-height: 1.35em;
  margin: 12px 0 0;
  color: #fda4af;
}

.login-alert:not(:empty) {
  padding: 12px 14px;
  border: 1px solid rgba(253, 164, 175, 0.45);
  border-radius: 8px;
  background: rgba(190, 24, 93, 0.13);
  line-height: 1.5;
}

.success {
  min-height: 1.35em;
  margin: 8px 0 0;
  color: #86efac;
}

.notice {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.portal-card {
  padding: 46px;
}

.portal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.portal-header form {
  flex: 0 0 auto;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-actions form {
  margin: 0;
}

button.secondary {
  width: auto;
  margin: 0;
  color: #d9e2ef;
  background: rgba(255, 255, 255, 0.08);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 14px 18px;
  color: #d9e2ef;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 800;
}

.password-help {
  margin: 12px 0 0;
  color: #9eacc2;
  font-size: 0.84rem;
  line-height: 1.6;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: #c7d2fe;
  text-decoration: none;
}

/* 카드를 한 줄에 늘어놓는다. 개수를 세지 않고 auto-fit 으로 두어
   카드를 감추거나 되살려도 규칙을 고칠 필요가 없다.
   폭이 모자라면 자동으로 줄이 늘어난다.
   최소 130px 은 아이패드 세로에서 정해졌다. 그 폭의 카드 내부는 620px 이고
   150px 이면 3열까지만 들어가 넷째 장이 다음 줄로 밀렸다. */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.project {
  /* 한 줄에 여러 장이 들어가므로 세로를 줄인다. 종전 220px 은 3열 기준이었다. */
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  color: #fff;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.project:hover,
.project:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28);
}

.project.shipment {
  background: linear-gradient(150deg, rgba(245, 158, 11, 0.24), rgba(255, 255, 255, 0.03));
}

.project.feed {
  background: linear-gradient(150deg, rgba(34, 197, 94, 0.22), rgba(255, 255, 255, 0.03));
}

.project.growth {
  background: linear-gradient(150deg, rgba(168, 85, 247, 0.24), rgba(255, 255, 255, 0.03));
}

.project.codex-chat {
  background: linear-gradient(150deg, rgba(236, 72, 153, 0.24), rgba(255, 255, 255, 0.03));
}

.project.resources {
  background: linear-gradient(150deg, rgba(245, 158, 11, 0.24), rgba(255, 255, 255, 0.03));
}

.project.temperature {
  background: linear-gradient(150deg, rgba(56, 189, 248, 0.23), rgba(255, 255, 255, 0.03));
}

.project.ventilation {
  background: linear-gradient(150deg, rgba(45, 212, 191, 0.24), rgba(255, 255, 255, 0.03));
}

.project.water {
  background: linear-gradient(150deg, rgba(14, 165, 233, 0.23), rgba(255, 255, 255, 0.03));
}

.project.haccp {
  background: linear-gradient(150deg, rgba(132, 204, 22, 0.21), rgba(255, 255, 255, 0.03));
}

.project.mortality {
  background: linear-gradient(150deg, rgba(168, 85, 247, 0.22), rgba(255, 255, 255, 0.03));
}

.project.biosecurity {
  background: linear-gradient(150deg, rgba(249, 115, 22, 0.22), rgba(255, 255, 255, 0.03));
}

.project.security {
  background: linear-gradient(150deg, rgba(100, 116, 139, 0.25), rgba(255, 255, 255, 0.03));
}

.project.future-card {
  display: none;
}

.project.future-card:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.10);
}

.project .icon {
  font-size: 2.2rem;
}

.project .fan-icon {
  position: relative;
  display: block;
  width: 2.45rem;
  height: 2.45rem;
  border: 2px solid rgba(153, 246, 228, 0.82);
  border-radius: 50%;
  color: #5eead4;
  background:
    conic-gradient(
      from 12deg,
      transparent 0deg 12deg,
      currentColor 12deg 54deg,
      transparent 54deg 102deg,
      currentColor 102deg 144deg,
      transparent 144deg 192deg,
      currentColor 192deg 234deg,
      transparent 234deg 282deg,
      currentColor 282deg 324deg,
      transparent 324deg 360deg
    );
  box-shadow:
    inset 0 0 0 3px rgba(6, 31, 29, 0.82),
    0 0 18px rgba(45, 212, 191, 0.22);
}

.project .fan-icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.48rem;
  height: 0.48rem;
  border: 2px solid rgba(153, 246, 228, 0.92);
  border-radius: 50%;
  background: #0b2925;
  transform: translate(-50%, -50%);
}

.project strong {
  margin-top: 20px;
  font-size: 1.55rem;
}

@media (max-width: 760px) {
  .shell {
    padding: 16px;
  }

  .login-card,
  .portal-card {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .portal-header {
    display: grid;
  }

  .account-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-actions form,
  .account-actions button,
  .button-link {
    width: 100%;
  }

  .project {
    min-height: 170px;
  }
}
