/* ===============================
   GOFFSTEIN DENTAL LOGIN UI
   =============================== */

:root {
  --bg: #0e1117;
  --card: #ffffff;
  --accent: #0057ff;
  --accent-dark: #0043c7;
  --text: #1f2937;
  --muted: #6b7280;
  --danger: #b91c1c;
}

/* ===============================
   RESET
   =============================== */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Ubuntu, sans-serif;
  color: var(--text);
}

/* ===============================
   PAGE + ANIMATED BACKGROUND
   =============================== */

.login-page {
  position: relative;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    120deg,
    #020617,
    #0f172a,
    #020617,
    #020617
  );
  background-size: 300% 300%;
  animation: bg-flow 22s ease infinite;

  overflow: hidden;
}

@keyframes bg-flow {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

/* зерно / глубина */
.login-page::after {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");

  pointer-events: none;
  z-index: 1;
}

/* ===============================
   BACKGROUND BLOBS
   =============================== */

.bg-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.bg-blobs span {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  animation: blob-float 28s infinite ease-in-out alternate;
  will-change: transform;
}

.bg-blobs span:nth-child(1) {
  background: #0057ff;
  top: -160px;
  left: -160px;
}

.bg-blobs span:nth-child(2) {
  background: #00d4ff;
  bottom: -200px;
  right: -180px;
  animation-duration: 36s;
}

.bg-blobs span:nth-child(3) {
  background: #7c3aed;
  top: 35%;
  left: 60%;
  animation-duration: 42s;
}

@keyframes blob-float {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(80px, -60px) scale(1.05);
  }
}

/* ===============================
   CARD
   =============================== */

.login-card {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 380px;
  padding: 36px 34px 28px;

  background: var(--card);
  border-radius: 16px;

  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);

  animation:
    card-in 0.6s ease-out,
    idle-float 6s ease-in-out infinite;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes idle-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ===============================
   LOGO
   =============================== */

.logo {
  text-align: center;
  margin-bottom: 18px;
}

.logo img {
  max-width: 180px;
  height: auto;
}

/* ===============================
   TITLES
   =============================== */

.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

.subtitle {
  margin-top: 6px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ===============================
   ERROR
   =============================== */

.error {
  margin: 18px 0;
  padding: 10px 12px;
  border-radius: 8px;

  background: #fee2e2;
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

/* ===============================
   FIELDS (FLOATING LABEL — FIXED)
   =============================== */

.field {
  position: relative;
  padding-top: 12px;
  margin-bottom: 24px;
}

.field:last-of-type {
  margin-bottom: 0;
}

.field input {
  width: 100%;
  padding: 14px 12px;

  font-size: 14px;

  border-radius: 10px;
  border: 1px solid #d1d5db;
  outline: none;

  background: transparent;

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.15);
}

.field label {
  position: absolute;
  left: 12px;
  top: 50%;

  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;

  background: var(--card);
  padding: 0 6px;

  transition: all 0.15s ease;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: -6px;
  font-size: 11px;
  color: var(--accent);
}

/* ===============================
   BUTTON
   =============================== */

button {
  width: 100%;
  margin-top: 26px;
  padding: 14px;

  border-radius: 12px;
  border: none;

  background: var(--accent);
  color: white;

  font-size: 14px;
  font-weight: 600;
  cursor: pointer;

  transition:
    background 0.2s,
    transform 0.05s,
    box-shadow 0.2s;
}

button:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 30px rgba(0, 87, 255, 0.35);
}

button:active {
  transform: translateY(1px);
}

/* ===============================
   FOOTER
   =============================== */

.footer {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/* ===============================
   MOBILE
   =============================== */

@media (max-width: 420px) {
  .login-card {
    margin: 0 16px;
    padding: 30px 24px;
  }
}

/* ===============================
   ACCESSIBILITY
   =============================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


.error {
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 13px;
  text-align: center;
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

.error.shake {
  animation: shake 0.35s ease;
}