/* ═══════════════════════════════════════════════════════════════
   login.css - stilurile paginii de autentificare

   Card de login centrat pe un fundal cu zgomot + glow, cu bloc de brand,
   formular (câmpuri, buton, mesaj de eroare) și ajustări responsive.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #07080d;
  --surface:     #0e1017;
  --surface2:    #151820;
  --border:      rgba(255,255,255,0.07);
  --border-focus:rgba(6,182,212,0.6);
  --accent:      #06b6d4;
  --accent-dim:  rgba(6,182,212,0.1);
  --accent-glow: rgba(6,182,212,0.2);
  --text:        #f0f1f5;
  --text2:       #6b7080;
  --text3:       #3a3d4a;
  --danger:      #f87171;
  --danger-dim:  rgba(248,113,113,0.08);
  --sans:        'Inter', sans-serif;
  --display:     'Syne', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Fundal ─────────────────────────── */
.bg-noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(6,182,212,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ─────────────────────────── */
.layout {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  animation: fadeUp 0.5s ease both;
}

/* ── Bloc de brand ───────────────────── */
.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-dim);
  border: 1px solid rgba(6,182,212,0.2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--accent-glow);
}

.brand-title {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-sub {
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 0.04em;
}

/* ── Bloc de formular ────────────────── */
.form-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 1rem;
}

label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: 0.03em;
}

input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

input::placeholder { color: var(--text3); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent);
  color: #020e12;
  border: none;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.btn:hover {
  background: #0891b2;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn:active { transform: scale(0.98); }

/* ── Mesaj de eroare ─────────────────── */
.error-msg {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--danger-dim);
  border: 1px solid rgba(248,113,113,0.2);
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 1.25rem;
}

/* ── Animație ───────────────────────── */
/* @keyframes fadeUp mutat în /hub/css/animations.css (valoarea canonică 12px) */

/* ── Responsive ─────────────────────── */
@media (max-width: 480px) {
  body {
    overflow: auto;
    align-items: flex-start;
    padding: 2rem 0;
  }
  .layout {
    padding: 0 1rem;
    gap: 2rem;
  }
  .brand-title { font-size: 1.6rem; }
  .form-block { padding: 1.25rem; }
  input { font-size: 16px; }
}

@media (max-width: 640px), (max-height: 720px) {
  body {
    overflow: auto;
    align-items: flex-start;
    padding: 1.5rem 0;
  }

  .layout {
    max-width: 100%;
  }
}

@media (max-height: 600px) {
  body { overflow: auto; align-items: flex-start; padding: 1.5rem 0; }
  .layout { gap: 1.5rem; }
  .brand-icon { width: 44px; height: 44px; }
}
