/* ==========================================================================
   YANO STARS — FORMS + AUTH SHELL
   Shared by login, register, submit-entry, profile edit, admin forms.
   ========================================================================== */

/* ------------------------------ Flash messages ------------------------------ */
.flash {
  padding: 0.9rem 1.2rem; border-radius: var(--r-md); margin-bottom: 1rem;
  font-size: 0.9rem; font-weight: 600; border: 1px solid transparent;
}
.flash--success { background: rgba(46,204,113,0.1); color: #6ee7a8; border-color: rgba(46,204,113,0.3); }
.flash--error   { background: rgba(255,106,0,0.1); color: #ff9a52; border-color: rgba(255,106,0,0.35); }
.flash--info    { background: rgba(0,229,255,0.08); color: #7fefff; border-color: rgba(0,229,255,0.3); }

/* ------------------------------ Fields ------------------------------ */
.field { margin-bottom: 1.2rem; }
.field label {
  display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.5rem;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.95rem 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--r-md);
  color: var(--y-white); font-size: 1rem;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background var(--dur-base);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--y-gold);
  box-shadow: 0 0 0 3px rgba(255,193,7,0.15);
  background: rgba(255,255,255,0.06);
}
.field textarea { min-height: 120px; resize: vertical; }
.field__hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.4rem; }
.field__error { font-size: 0.78rem; color: #ff9a52; margin-top: 0.4rem; }

/* Avatar uploader (dashboard profile edit) */
.avatar-uploader { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.avatar-uploader__preview {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border-gold); flex-shrink: 0;
  background: var(--y-black-raised);
}
.avatar-uploader__controls { display: flex; flex-direction: column; gap: 0.6rem; }
.avatar-uploader__input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.avatar-uploader__remove {
  display: flex; align-items: center; gap: 0.5em;
  font-size: 0.82rem; color: var(--text-muted); cursor: pointer;
}
.avatar-uploader__remove input { width: auto; }

/* Password toggle */
.field--password { position: relative; }
.field--password .toggle-pw {
  position: absolute; right: 0.9rem; top: 2.55rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--text-muted); text-transform: uppercase; cursor: pointer;
}
.field--password .toggle-pw:hover { color: var(--y-gold); }

/* ------------------------------ Auth shell ------------------------------ */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr;
  background: var(--y-black) radial-gradient(ellipse at 70% 10%, #1c1405 0%, #0A0A0A 55%);
  /* Left-panel photo; can be overridden per auth page via inline style. */
  --auth-aside-img: url('/assets/img/winner-bg.png');
}
.auth__aside { display: none; }
.auth__main {
  display: flex; flex-direction: column; justify-content: center;
  padding: 2.5rem var(--gutter);
  min-height: 100vh;
  position: relative;
}
/* Faint star pattern behind the form panel. */
.auth__main::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: url('/assets/img/pattern-stars.png') repeat;
  background-size: 460px auto;
  opacity: 0.4;
  pointer-events: none;
}
.auth__card { position: relative; z-index: 1; }
.auth__card { width: 100%; max-width: 460px; margin-inline: auto; }
.auth__back {
  display: flex; align-items: center; gap: 0.4em; width: fit-content;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-secondary); text-transform: uppercase;
  padding: 0.55em 1.1em; margin-bottom: 1.6rem;
  border: 1px solid var(--border-subtle); border-radius: var(--r-pill);
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.auth__back:hover { color: var(--y-gold); border-color: var(--border-gold); background: rgba(255,193,7,0.06); }
.auth__brand { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 2rem; }
.auth__brand img { width: 42px; height: 42px; }
.auth__brand span { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.06em; }
.auth__brand em { color: var(--y-gold); font-style: normal; }
.auth__title { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1; margin-bottom: 0.6rem; }
.auth__subtitle { color: var(--text-secondary); margin-bottom: 2rem; }
.auth__footer { margin-top: 1.6rem; font-size: 0.9rem; color: var(--text-secondary); text-align: center; }
.auth__footer a { color: var(--y-gold); font-weight: 700; }
.auth__row { display: grid; gap: 1.2rem; }
@media (min-width: 520px) { .auth__row--2 { grid-template-columns: 1fr 1fr; } }

/* Split hero panel on wide screens */
@media (min-width: 960px) {
  .auth { grid-template-columns: 1.05fr 0.95fr; }
  .auth__aside {
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 3.5rem; position: relative; overflow: hidden;
    background:
      linear-gradient(180deg, rgba(10,10,10,0.55), rgba(10,10,10,0.9)),
      radial-gradient(ellipse at 30% 20%, rgba(255,193,7,0.14), transparent 60%),
      var(--auth-aside-img, none) center/cover no-repeat,
      var(--y-black);
    border-right: 1px solid var(--border-subtle);
  }
  .auth__aside-mark { width: 80px; height: 80px; }
  .auth__aside-headline {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 4vw, 4rem); line-height: 0.95; text-transform: uppercase;
  }
  .auth__aside-headline .text-gradient { display: block; }
  .auth__aside-sub { color: var(--text-secondary); max-width: 40ch; margin-top: 1rem; }
  .auth__aside-foot { font-size: 0.78rem; letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-muted); }
}
