/* ============================================================
   Trang Đăng nhập / Đăng ký (login.html) — "Modern SaaS UI"
   File riêng, tách khỏi main.css (khu vực dashboard) vì đây là ngôn ngữ
   thị giác hoàn toàn khác (card 2 cột, banner minh hoạ) chỉ dùng ở 1 trang
   duy nhất. main.css vẫn được nạp trước để lấy phần reset dùng chung
   (`* { box-sizing }`, màu nền mặc định...).
   ============================================================ */

:root {
  --auth-bg: #ebf3fe;
  --auth-blue: #1e62ec;
  --auth-blue-dark: #1752d5;
  --auth-cta-hover: #1d4ed8;
  --auth-input-bg: #f8fafc;
  --auth-input-border: #e2e8f0;
  --auth-placeholder: #94a3b8;
  --auth-title: #1e293b;
  --auth-muted: #64748b;
}

.auth-page {
  margin: 0;
  min-height: 100vh;
  background: var(--auth-bg);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 960px;
  min-height: 560px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  overflow: hidden; /* để 2 góc trái của .auth-banner không tràn ra ngoài bo góc card */
}

/* ---------------- Cột trái: Banner minh hoạ ---------------- */

.auth-banner {
  position: relative;
  flex: 1 1 50%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-blue) 0%, var(--auth-blue-dark) 100%);
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  overflow: hidden;
}

/* Hoạ tiết lục giác mờ phía sau — dựng thuần bằng CSS gradient (không cần
   ảnh/SVG riêng): 6 lớp linear-gradient chồng lên nhau theo đúng góc lệch
   30°/150°/60° tạo ra lưới hình lục giác khi lặp lại (background-size). */
.auth-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      30deg,
      rgba(255, 255, 255, 0.07) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(255, 255, 255, 0.07) 87.5%,
      rgba(255, 255, 255, 0.07)
    ),
    linear-gradient(
      150deg,
      rgba(255, 255, 255, 0.07) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(255, 255, 255, 0.07) 87.5%,
      rgba(255, 255, 255, 0.07)
    ),
    linear-gradient(
      30deg,
      rgba(255, 255, 255, 0.07) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(255, 255, 255, 0.07) 87.5%,
      rgba(255, 255, 255, 0.07)
    ),
    linear-gradient(
      150deg,
      rgba(255, 255, 255, 0.07) 12%,
      transparent 12.5%,
      transparent 87%,
      rgba(255, 255, 255, 0.07) 87.5%,
      rgba(255, 255, 255, 0.07)
    ),
    linear-gradient(
      60deg,
      rgba(255, 255, 255, 0.05) 25%,
      transparent 25.5%,
      transparent 75%,
      rgba(255, 255, 255, 0.05) 75%,
      rgba(255, 255, 255, 0.05)
    ),
    linear-gradient(
      60deg,
      rgba(255, 255, 255, 0.05) 25%,
      transparent 25.5%,
      transparent 75%,
      rgba(255, 255, 255, 0.05) 75%,
      rgba(255, 255, 255, 0.05)
    );
  background-size: 44px 76px;
  background-position: 0 0, 0 0, 22px 38px, 22px 38px, 0 0, 22px 38px;
  pointer-events: none;
}

/* Logo For Future thật, bọc trong pill trắng để nổi trên nền xanh — cùng
   cách apps/web/src/components/layout/footer.tsx xử lý logo trên nền tối. */
.auth-logo-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  background: #fff;
  border-radius: 999px;
  padding: 9px;
}

.auth-logo-pill img {
  display: block;
  width: 24px;
  height: 24px;
}

.auth-banner-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 20px;
}

.auth-headline {
  margin: 0 0 28px;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.2;
}

.auth-illustration {
  width: 100%;
  max-width: 300px;
  height: auto;
}

/* ---------------- Cột phải: Form ---------------- */

.auth-form-panel {
  flex: 1 1 50%;
  min-width: 0;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-title {
  margin: 0 0 24px;
  font-weight: 700;
  font-size: 26px;
  color: var(--auth-title);
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-title);
}

.auth-field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-border);
  font-size: 14px;
  color: var(--auth-title);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input::placeholder {
  font-size: 14px;
  color: var(--auth-placeholder);
}

.auth-field input:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 3px rgba(30, 98, 236, 0.15);
}

.auth-error {
  min-height: 1em;
  margin: 0 0 12px;
  font-size: 13px;
  color: #dc2626;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  background: var(--auth-blue);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.auth-submit-btn:hover {
  background: var(--auth-cta-hover);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

/* ---------------- Responsive ---------------- */
/* Dưới breakpoint: ẩn hẳn banner minh hoạ, form chiếm toàn bộ chiều rộng
   card — card tự thu lại theo max-width vừa 1 cột thay vì để trống nửa
   bên trái. */
@media (max-width: 860px) {
  .auth-banner {
    display: none;
  }

  .auth-card {
    max-width: 440px;
    min-height: 0;
  }

  .auth-form-panel {
    padding: 40px 28px;
  }
}
