/* Phần thêm của MetaAds cho mẫu Halloween — để riêng, không sửa style.css gốc
   nên lần sau cập nhật mẫu chỉ cần chép đè file kia.

   Hai việc: (1) bổ sung vài khối mẫu gốc không có, (2) kéo bảng màu chế độ
   NGÀY về đúng tông MetaAds (xanh ngọc + xám đá) thay cho tông xanh mòng két
   của mẫu. Chế độ ĐÊM giữ nguyên — đó mới là phần Halloween. */

/* Bảng màu light của dashboard, lấy từ app/globals.css. */
:root {
  --ma-text: #0f172a;
  --ma-muted: #334155;
  --ma-dim: #64748b;
  --ma-accent: #10b981;
  --ma-accent-2: #059669;
  --ma-accent-light: #34d399;
  --ma-accent-ink: #042018;
  --ma-border: rgb(15 23 42 / 10%);
}

/* Layout gốc của app đặt nền tối + min-h-screen lên body; mẫu cần căn giữa.
   Khai lại ở đây để không phụ thuộc thứ tự nạp 2 file CSS. */
body {
  display: grid;
  place-items: center;
  min-height: 100svh;
  margin: 0;
  background: #f6f8fb;
  color: var(--ma-text);
}

body.night {
  background: #0b1420;
  color: #172b33;
}

/* ── Chế độ NGÀY: đổi tông mòng két của mẫu sang xanh ngọc MetaAds ───────── */

/* Bầu trời ban ngày của mẫu là xanh xám lam; kéo về tông xanh ngọc nhạt cho
   gần dải màu dashboard. Chỉ đổi sắc, giữ nguyên độ sáng để đồi núi trong
   ảnh SVG không bị lệch tông. */
body:not(.night) .landscape-scene {
  background:
    radial-gradient(ellipse at 23% 17%, rgb(255 241 214 / 60%), transparent 48%),
    linear-gradient(#b9d8cd, #eaf4f0 48%, #9cc0b2);
}

body:not(.night) .scene-panel {
  background: #0b2a20;
}

body:not(.night) .login-card {
  border-color: rgb(255 255 255 / 76%);
  background: rgb(255 255 255 / 44%);
  box-shadow:
    0 32px 90px rgb(15 23 42 / 14%),
    0 8px 24px rgb(15 23 42 / 7%),
    inset 0 1px 0 rgb(255 255 255 / 92%);
}

body:not(.night) h1,
body:not(.night) .login-form {
  color: var(--ma-text);
}

body:not(.night) .field input {
  border-color: var(--ma-border);
  background: rgb(255 255 255 / 72%);
  color: var(--ma-text);
  box-shadow:
    inset 0 1px 1px rgb(255 255 255 / 60%),
    0 4px 12px rgb(15 23 42 / 4%);
}

body:not(.night) .field input::placeholder {
  color: var(--ma-dim);
}

body:not(.night) .field input:focus {
  border-color: var(--ma-accent);
  box-shadow:
    0 0 0 3px rgb(16 185 129 / 18%),
    inset 0 1px 0 rgb(255 255 255 / 70%);
}

body:not(.night) .eye:hover img {
  background: rgb(16 185 129 / 12%);
}

body:not(.night) .text-action {
  color: var(--ma-accent-2);
}

body:not(.night) .text-action:hover {
  color: #047857;
}

body:not(.night) .submit {
  border-color: rgb(255 255 255 / 28%);
  background: linear-gradient(135deg, var(--ma-accent-light), var(--ma-accent));
  /* Chữ đậm trên nền xanh ngọc — cùng cặp màu nút chính của dashboard. */
  color: var(--ma-accent-ink);
  box-shadow:
    0 8px 20px rgb(16 185 129 / 26%),
    inset 0 1px 0 rgb(255 255 255 / 28%);
}

body:not(.night) .submit:hover {
  box-shadow:
    0 11px 24px rgb(16 185 129 / 34%),
    inset 0 1px 0 rgb(255 255 255 / 34%);
}

/* Mũi tên là SVG đen — nền xanh ngọc sáng nên giữ nguyên, chỉ hạ độ đậm. */
body:not(.night) .submit img {
  opacity: 0.82;
}

body:not(.night) .signup-row {
  color: var(--ma-dim);
}

body:not(.night) .status {
  color: var(--ma-muted);
}

/* ── Khối mẫu gốc không có ────────────────────────────────────────────────── */

.login-form .form-lead {
  margin: -10px 0 4px;
  font-size: 15px;
  opacity: 0.72;
}

.login-form .remember-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: -4px;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  opacity: 0.86;
}

.login-form .remember-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

body:not(.night) .login-form .remember-row input {
  accent-color: var(--ma-accent);
}

body.night .login-form .remember-row input {
  accent-color: #e4792b;
}

.login-form .security-note {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.6;
}

/* Trạng thái rỗng vẫn chiếm chỗ thì khối trượt lên xuống mỗi lần báo lỗi. */
.login-form .status:empty {
  display: none;
}

.login-form .submit[disabled] {
  opacity: 0.65;
  cursor: progress;
}

/* ── Nửa trái: dàn nội dung kín panel thay vì nhét vào cột 250px giữa ────────
   Mẫu gốc đặt .scene-copy absolute ở top 75% nên panel càng cao càng hẹp thì
   chữ càng dồn cục. Thay bằng một lớp phủ kín panel, chia 2 đầu: thương hiệu
   trên, nội dung dưới. */

.scene-panel .ma-hero {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  /* Chừa 62px bên phải cho nút ngày/đêm (44px + lề). */
  padding: 22px 62px 26px 24px;
  color: #fff;
  text-shadow: 0 2px 12px rgb(0 10 25 / 38%);
  pointer-events: none;
}

.ma-brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ma-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--ma-accent-light);
  color: var(--ma-accent-ink);
  font-size: 15px;
  font-weight: 700;
  text-shadow: none;
  box-shadow: 0 6px 16px rgb(16 185 129 / 34%);
}

.ma-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.ma-brand-text strong {
  font-size: 15px;
}

.ma-brand-text small {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}

/* Ghi đè định vị tuyệt đối của mẫu — giờ nó là phần tử dòng chảy trong .ma-hero. */
.scene-panel .scene-copy {
  position: static;
  width: auto;
  transform: none;
  text-align: left;
}

.scene-panel .scene-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(21px, 2.1vw, 28px);
  line-height: 1.18;
}

.scene-panel .scene-copy p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  opacity: 0.88;
}

.ma-points {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.ma-points li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.45;
}

.ma-points li::before {
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ma-accent-light);
  content: "";
}

.ma-points b {
  display: block;
  font-weight: 700;
}

.ma-points span {
  opacity: 0.74;
}

.ma-foot {
  margin: 18px 0 0 !important;
  font-size: 10.5px !important;
  opacity: 0.55 !important;
}

/* Panel thấp dần thì bỏ bớt từ dưới lên, giữ tiêu đề là phần luôn còn. */
@media (max-height: 760px), (max-width: 900px) {
  .ma-points {
    display: none;
  }
}

@media (max-height: 640px) {
  .ma-foot {
    display: none;
  }
}

/* Dưới 640px mẫu xếp 1 cột, panel thành dải ngang 220px — chữ phải gọn lại. */
@media (max-width: 640px) {
  .scene-panel .ma-hero {
    gap: 10px;
    padding: 16px 58px 18px 18px;
  }
  .scene-panel .scene-copy h2 {
    margin-bottom: 6px;
    font-size: 20px;
  }
  .scene-panel .scene-copy p {
    font-size: 12px;
    line-height: 1.45;
  }
  .ma-logo {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .ma-brand-text strong {
    font-size: 13.5px;
  }
  .ma-brand-text small {
    font-size: 9.5px;
  }
}

/* Máy rất hẹp: bỏ đoạn mô tả, chỉ còn thương hiệu + tiêu đề. */
@media (max-width: 380px) {
  .scene-panel .scene-copy p:not(.ma-foot) {
    display: none;
  }
}
