/* ============================================================
   DYNOMIC – auth.css
   Style dla stron: login, register, forgot password
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 50% 50% at 50% 0%, rgba(229,28,28,.12) 0%, transparent 70%),
    var(--bg);
  padding: 24px 16px;
}

.auth-container {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.auth-card {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.auth-sub {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 28px;
}

/* ── Komunikaty ─────────────────────────────────────────────── */
.auth-msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 20px;
  border: 1px solid;
}
.auth-msg--error {
  background: rgba(229,28,28,.1);
  border-color: rgba(229,28,28,.4);
  color: #ff8080;
}
.auth-msg--success {
  background: rgba(34,197,94,.1);
  border-color: rgba(34,197,94,.4);
  color: #86efac;
}

/* ── Formularz ──────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.form-group input,
.form-group select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  padding: 11px 14px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229,28,28,.15);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: rgba(229,28,28,.5);
}

.hint {
  font-size: .75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.field-hint {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Password eye toggle ────────────────────────────────────── */
.input-eye {
  position: relative;
}
.input-eye input {
  padding-right: 42px;
}
.eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: .5;
  transition: opacity var(--transition);
  padding: 4px;
  line-height: 1;
}
.eye-btn:hover { opacity: .85; }

/* ── Checkboxy ──────────────────────────────────────────────── */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.form-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-top: 2px;
  accent-color: var(--red);
  cursor: pointer;
}
.form-check a {
  color: var(--red);
  text-decoration: underline;
}

/* ── Forgot link ────────────────────────────────────────────── */
.forgot-link {
  font-size: .78rem;
  font-weight: 400;
  color: var(--red);
  text-decoration: none;
  opacity: .85;
}
.forgot-link:hover { opacity: 1; text-decoration: underline; }

/* ── Full width button ──────────────────────────────────────── */
.btn--full {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding: 13px;
  font-size: 1rem;
}

/* ── Switch link ────────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: .85rem;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .form-row  { grid-template-columns: 1fr; gap: 0; }
}
