body:not(.authenticated) .app { display: none; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(168, 224, 99, .13), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(14, 165, 200, .1), transparent 32%),
    #0f1410;
}

.auth-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

.auth-screen[hidden] { display: none; }

.auth-card {
  position: relative;
  width: min(100%, 430px);
  overflow: hidden;
  border: 1px solid #2a3a2c;
  border-radius: 18px;
  background: #161d18;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48);
  animation: auth-rise .45s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header {
  padding: 34px 32px 28px;
  border-bottom: 1px solid #2a3a2c;
  background: linear-gradient(145deg, #1e2820, #111713);
}

.auth-mark {
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  color: #a8e063;
}

.auth-header h1 {
  margin: 0 0 7px;
  color: #e8ede9;
  font-family: 'Playfair Display', serif;
  font-size: 31px;
  font-weight: 400;
}

.auth-header p {
  margin: 0;
  color: #6b7d6e;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.auth-body { padding: 28px 32px 32px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 9px;
  background: #0f1410;
}

.auth-tab {
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7d6e;
  font: 500 11px 'DM Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-tab.active { background: #253020; color: #a8e063; }
.auth-form[hidden] { display: none; }

.auth-field { margin-bottom: 16px; }
.auth-field label {
  display: block;
  margin-bottom: 7px;
  color: #a2b0a4;
  font: 500 10px 'DM Mono', monospace;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #2a3a2c;
  border-radius: 8px;
  outline: none;
  background: #0f1410;
  color: #e8ede9;
  font: 14px 'Instrument Sans', sans-serif;
  transition: border-color .15s, box-shadow .15s;
}

.auth-field input:focus {
  border-color: #4caf72;
  box-shadow: 0 0 0 3px rgba(76, 175, 114, .12);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  padding: 13px 16px;
  border: 0;
  border-radius: 8px;
  background: #a8e063;
  color: #0f1410;
  font: 600 13px 'Instrument Sans', sans-serif;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.auth-submit:hover { background: #b9ec7d; transform: translateY(-1px); }
.auth-submit:disabled { cursor: wait; opacity: .55; transform: none; }

.auth-link {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: none;
  color: #a2b0a4;
  font: 12px 'Instrument Sans', sans-serif;
  text-decoration: underline;
  cursor: pointer;
}

.auth-message {
  display: none;
  margin-bottom: 16px;
  padding: 11px 12px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.45;
}

.auth-message.error { display: block; border: 1px solid rgba(224, 85, 85, .4); background: rgba(224, 85, 85, .1); color: #f1a0a0; }
.auth-message.success { display: block; border: 1px solid rgba(76, 175, 114, .4); background: rgba(76, 175, 114, .1); color: #9ddeaf; }

.account-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2a3a2c;
}

.account-avatar {
  display: grid;
  flex: 0 0 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #253020;
  color: #a8e063;
  font: 500 12px 'DM Mono', monospace;
}

.account-copy { min-width: 0; flex: 1; }
.account-label { color: #6b7d6e; font: 9px 'DM Mono', monospace; letter-spacing: 1px; text-transform: uppercase; }
.account-email { overflow: hidden; color: #a2b0a4; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-logout { border: 0; background: none; color: #6b7d6e; font-size: 11px; cursor: pointer; }
.account-logout:hover { color: #e8ede9; }

.garden-loading {
  position: fixed;
  inset: 0;
  z-index: 2900;
  display: grid;
  place-items: center;
  background: #0f1410;
  color: #a8e063;
  font: 11px 'DM Mono', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@media (max-width: 520px) {
  .auth-body, .auth-header { padding-left: 22px; padding-right: 22px; }
}
