﻿
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #212121;
  background: radial-gradient(circle at 20% 20%, #fff, #f7f7f7 40%, #eaeaea 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: -150px;
  width: 620px;
  height: 620px;
  background: url('../img/911-ngang.avif') no-repeat center;
  background-size: 550px;
  opacity: 0.06;
  pointer-events: none;
  filter: blur(2px);
}

.auth-wrapper {
  width: min(480px, 92vw);
  margin: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.17);
  backdrop-filter: blur(8px);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.auth-header {
  padding: 24px 26px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(120deg, rgba(217, 14, 24, 0.3), rgba(217, 14, 24, 0.05));
}

.auth-header h2 {
  margin: 0;
  color: #b00;
  font-size: 1.9rem;
  letter-spacing: 0.01em;
}

.auth-header p {
  margin: 8px 0 0;
  color: #555;
  font-size: 0.95rem;
}

.auth-body {
  padding: 22px 26px 26px;
}

.auth-body form {
  display: grid;
  gap: 12px;
}

.auth-body input[type='text'],
.auth-body input[type='email'],
.auth-body input[type='password'],
.auth-body input[type='datetime-local'],
.auth-body select {
  width: 100%;
  font-size: 1rem;
  color: #2a2a2a;
  padding: 12px 14px;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  background: #fcfcfc;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-body input:focus,
.auth-body select:focus {
  border-color: #d10000;
  outline: none;
  box-shadow: 0 0 0 3px rgba(209, 0, 0, 0.12);
}

.auth-body button[type='submit'] {
  margin-top: 4px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  background-image: linear-gradient(135deg, #b00000, #e31c1c);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.auth-body button[type='submit']:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(176, 0, 0, 0.35);
}

.auth-body button[type='submit']:active {
  transform: translateY(0);
  box-shadow: 0 5px 14px rgba(176, 0, 0, 0.38);
}

.auth-body .switch-box {
  margin-top: 10px;
  text-align: center;
  font-size: 0.98rem;
}

.auth-body .switch-box a {
  color: #b00;
  text-decoration: none;
  font-weight: 600;
}

.auth-body .switch-box a:hover {
  text-decoration: underline;
}

.auth-error {
  margin-bottom: 10px;
  color: #9d1e1e;
  background: #ffe6e6;
  border: 1px solid #f0bbbb;
  border-radius: 8px;
  padding: 10px 12px;
}

.home-btn-top {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  color: #b00;
  border: 2px solid #b00;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(176, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.home-btn-top:hover {
  background: linear-gradient(135deg, #b00, #d10000);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(176, 0, 0, 0.4);
}

.home-btn-top:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(176, 0, 0, 0.3);
}

@media (max-width: 420px) {
  .auth-wrapper {
    margin: 12px;
  }

  .auth-header h2 {
    font-size: 1.7rem;
  }
}

