/* ============================================================
   AUTH COLORFUL UI - login / register / forgot-password
   PHIÊN BẢN TỐI ƯU HIỆU NĂNG (no-lag):
   - Bỏ color-blob float, đồng xu bay, logo float, shine lặp
   - Giữ nền sạch + card trắng + accent gradient động theo theme
   - Chạy trên Bootstrap/Datum/AdminLTE, không thêm thư viện
   ============================================================ */

:root{--c-green:#16a34a;--c-blue:#3fa79c;--c-yellow:#f2a900;--c-red:#c0523c;--c-gold:#f2a900;
  --c-gold2:#ffe27a;--ink:#154b60;--ink-soft:#1c6f74;--line:#e9d7b0;
  /* động theo theme_color / theme_color2 (inject từ header.php) */
  --ac-1: var(--theme-1, #5b8def);
  --ac-2: var(--theme-2, #7a5cff);
}

.auth-colorful-body{position:relative;min-height:100vh;
  /* [FIX] Trước đây: overflow:hidden  — overflow đặt trên thẻ <body> sẽ
     truyền lên viewport => KHÔNG THỂ CUỘN trang, form đăng ký dài bị cắt,
     không với tới checkbox điều khoản / captcha / nút Đăng ký.
     Giữ ẩn trục ngang (chống scroll ngang do trang trí) nhưng cho cuộn dọc. */
  overflow-x:hidden;overflow-y:visible;background:#f8eed6;display:flex;align-items:center;justify-content:center;padding:24px 12px;font-family:"Be Vietnam Pro","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;color:var(--ink);
}

/* ----- Nền trang trí TĨNH (thay blob float gây lag) ----- */
/* Viền gradient mesh nhẹ, không animation */
.auth-colorful-body::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:
    radial-gradient(60% 50% at 0% 0%, color-mix(in srgb, var(--ac-1) 16%, transparent) 0%, transparent 60%),
    radial-gradient(60% 50% at 100% 0%, color-mix(in srgb, var(--ac-2) 16%, transparent) 0%, transparent 60%),
    radial-gradient(60% 60% at 50% 110%, color-mix(in srgb, var(--c-green) 12%, transparent) 0%, transparent 55%);
}

/* chấm trống nhẹ (tĩnh, dùng background, không animation) */
.color-dots{position:absolute;inset:0;z-index:0;pointer-events:none;background-image:radial-gradient(rgba(21,75,96,.05) 1.4px,transparent 1.4px);background-size:30px 30px;mask-image:radial-gradient(circle at center,#2b1b0e 25%,transparent 80%);-webkit-mask-image:radial-gradient(circle at center,#2b1b0e 25%,transparent 80%);
}

/* Optional nền ảnh mờ */
.auth-colorful-body .auth-bg-img{position:absolute;inset:0;background-size:cover;background-position:center;opacity:.06;z-index:0;
}

/* ----- Card trắng ----- */
.cf-card{position:relative;z-index:2;width:100%;max-width:460px;border-radius:28px;background:#f8eed6;border:1px solid var(--line);box-shadow:0 30px 70px rgba(21,75,96,.14), 0 8px 24px rgba(21,75,96,.06);padding:36px 34px 28px;overflow:hidden;
}
/* dải màu trên đỉnh card theo theme */
.cf-card::before{content:"";position:absolute;top:0;left:0;right:0;height:6px;background:linear-gradient(90deg, var(--ac-1), var(--ac-2), var(--c-green));
}

.cf-card .cf-logo{text-align:center;margin-bottom:14px; }
.cf-card .cf-logo img{max-height:56px;width:auto; }
/* [FIX 2026-10-06] Bỏ hiệu ứng zoom (to/nhỏ) khi hover logo — theo yêu cầu */
.cf-card .cf-logo img:hover{transform:none; }

/* ----- Logo MONNY (wordmark mới, tĩnh, không float) ----- */
.cf-card .cf-logo.cf-logo-3d{position:relative;margin-bottom:8px;padding-top:6px;display:flex;align-items:center;justify-content:center;
}
.cf-logo-3d .cf-logo-coin-glow{display:none; }
.cf-logo-3d .cf-logo-3d-img{position:relative;z-index:1;max-height:58px;width:auto;filter:drop-shadow(0 6px 14px rgba(63,167,156,.25));
}

.cf-card h3{font-size:27px;font-weight:800;text-align:center;margin:0 0 6px;color:var(--ink);letter-spacing:-.2px;
}
/* chữ tiêu đề gradient theo theme */
.cf-card h3 .cf-grad{background:linear-gradient(90deg,var(--ac-1),var(--ac-2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
.cf-card .cf-sub{text-align:center;color:var(--ink-soft);font-size:14px;margin-bottom:22px;
}

/* ----- Field ----- */
.cf-field{position:relative;margin-bottom:16px; }
.cf-field label{display:block;font-size:13px;font-weight:700;color:#154b60;margin-bottom:7px;
}
.cf-field label .cf-link{float:right;color:var(--ac-1);font-weight:600;text-decoration:none;
}
.cf-field label .cf-link:hover{text-decoration:underline; }

.cf-input-wrap{position:relative;display:flex;align-items:center; }
.cf-input-wrap .cf-ico{position:absolute;left:14px;font-size:16px;pointer-events:none;transition:color .2s;
}
.cf-input-wrap .cf-ico.green{color:var(--c-green); }
.cf-input-wrap .cf-ico.blue {color:var(--c-blue); }
.cf-input-wrap .cf-ico.yellow{color:#d9a406; }
.cf-input-wrap .cf-ico.red{color:var(--c-red); }

.cf-input{width:100%;height:52px;padding:0 14px 0 44px;border-radius:14px;border:1.5px solid var(--line);background:#efe0bb;color:var(--ink);font-size:15px;transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;outline:none;
}
.cf-input::placeholder{color:#3fa79c; }
.cf-input:focus{border-color:var(--ac-1);background:#f8eed6;box-shadow:0 0 0 4px color-mix(in srgb, var(--ac-1) 18%, transparent);
}
.cf-input.has-toggle{padding-right:46px; }

.cf-toggle-eye{position:absolute;right:10px;background:transparent;border:none;color:#3fa79c;cursor:pointer;padding:8px;font-size:16px;border-radius:8px;transition:color .2s,background .2s;
}
.cf-toggle-eye:hover{color:var(--ac-1);background:#efe0bb; }

/* reCAPTCHA */
.cf-recaptcha{display:flex;justify-content:center;margin:6px 0 4px; }

/* checkbox */
.cf-check-wrap{display:flex;align-items:flex-start;gap:10px;margin:6px 0 14px;
}
.cf-check-input{margin-top:3px;width:18px;height:18px;accent-color:var(--ac-1);flex:0 0 auto;cursor:pointer; }
.cf-check{font-size:13px;color:#1c6f74;line-height:1.5;user-select:none;cursor:pointer;
}
.cf-check a{color:var(--ac-1);text-decoration:none;font-weight:600; }
.cf-check a:hover{text-decoration:underline; }

/* ----- Submit button (gradient theo theme, không shine lặp) ----- */
.cf-btn{width:100%;height:54px;border:none;border-radius:16px;font-size:16px;font-weight:800;color:#fff;cursor:pointer;background:linear-gradient(120deg,var(--ac-1),var(--ac-2));box-shadow:0 14px 28px color-mix(in srgb, var(--ac-1) 32%, transparent);transition:transform .18s ease, box-shadow .2s ease, filter .2s ease;position:relative;overflow:hidden;
}
.cf-btn:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 18px 34px color-mix(in srgb, var(--ac-2) 30%, transparent);filter:brightness(1.05);
}
.cf-btn:active:not(:disabled){transform:translateY(0); }
.cf-btn:disabled{opacity:.7;cursor:not-allowed; }
/* shine chỉ chạy 1 lần khi hover (không lặp vô hạn gây repaint) */
.cf-btn::after{display:none; }

/* footer */
.cf-foot{text-align:center;font-size:14px;color:#1c6f74;margin-top:18px; }
.cf-foot a{font-weight:800;text-decoration:none;transition:filter .2s;background:linear-gradient(90deg,var(--ac-1),var(--ac-2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent; }
.cf-foot a:hover{filter:brightness(1.1); }

/* back home */
.cf-back-home{position:fixed;top:18px;left:18px;z-index:3;display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border-radius:30px;background:#f8eed6;border:1.5px solid var(--line);color:var(--ink);font-size:13px;font-weight:600;text-decoration:none;box-shadow:0 6px 18px rgba(21,75,96,.08);transition:transform .2s, color .2s, border-color .2s;
}
.cf-back-home:hover{transform:translateX(-3px);border-color:var(--ac-1);color:var(--ac-1); }

/* strength meter */
.cf-strength{margin:-6px 0 14px; }
.cf-strength-bar{height:7px;border-radius:7px;background:#efe0bb;overflow:hidden; }
.cf-strength-fill{height:100%;width:0%;border-radius:7px;transition:width .3s ease, background .3s ease; }
.cf-strength-text{font-size:12px;margin-top:5px;color:#1c6f74;display:flex;justify-content:space-between;font-weight:600; }

/* perks (4 ô màu) */
.cf-perks{list-style:none;margin:18px 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:10px; }
.cf-perks li{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:600;color:#154b60;border-radius:14px;padding:10px 12px;border:1.5px solid var(--line);
}
.cf-perks li i{font-size:15px; }
.cf-perks li:nth-child(1){background:#ecfdf5;border-color:#a7f3d0; }
.cf-perks li:nth-child(1) i{color:var(--c-green); }
.cf-perks li:nth-child(2){background:#efe0bb;border-color:#e9d7b0; }
.cf-perks li:nth-child(2) i{color:var(--c-blue); }
.cf-perks li:nth-child(3){background:#fffbeb;border-color:#fde68a; }
.cf-perks li:nth-child(3) i{color:#d9a406; }
.cf-perks li:nth-child(4){background:#c0523c;border-color:#c0523c; }
.cf-perks li:nth-child(4) i{color:var(--c-red); }

/* badge stats (đăng ký) */
.cf-stats{display:flex;gap:12px;justify-content:center;margin-bottom:18px;
}
.cf-stat{text-align:center;background:#efe0bb;border:1.5px solid var(--line);border-radius:14px;padding:8px 14px;min-width:84px;
}
.cf-stat b{display:block;font-size:18px;font-weight:800;line-height:1.1; }
.cf-stat span{font-size:11px;color:#1c6f74;font-weight:600; }
.cf-stat.g b{color:var(--c-green); }
.cf-stat.b b{color:var(--c-blue); }
.cf-stat.y b{color:#d9a406; }

/* responsive */
@media (max-width:520px){
  .cf-card{padding:26px 20px 22px;border-radius:22px; }
  .cf-card h3{font-size:23px; }
  .cf-perks{grid-template-columns:1fr; }
  .cf-back-home{top:10px;left:10px; }
}

/* loader datum */
.auth-colorful-body #loading{position:fixed;inset:0;z-index:9999;background:rgba(255,255,255,.7);display:none; }

/* ============================================================
   TÔN TRỌNG NGƯỜI DÙNG GIẢM MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce){
  .cf-btn, .cf-toggle-eye, .cf-back-home, .cf-card .cf-logo img{transition:none !important;
  }
}

/* ============================================================
   [FIX MOBILE] Checkbox điều khoản — vùng chạm to, chống double-tap zoom,
   chống highlight/tap-delay làm tick bị mất trên trình duyệt mobile.
   ============================================================ */
.cf-check-wrap{touch-action: manipulation;-webkit-tap-highlight-color: transparent;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;min-height: 44px;padding: 6px 4px;box-sizing: border-box;
}
.cf-check{cursor: pointer; }
.cf-check-input{cursor: pointer;touch-action: manipulation;-webkit-tap-highlight-color: transparent;
}
@media (max-width:520px){
  .cf-check-wrap{min-height: 52px;align-items: center; }
}

/* ============================================================
   [FIX 2026-10-06] KHÓA HIỆU ỨNG ZOOM (to/nhỏ) Ở TRANG ĐĂNG NHẬP / ĐĂNG KÝ
   - Chặn mọi animation "thở / thu to nhỏ" còn sót lại từ theme (cute-theme...)
   - Bỏ mọi transform scale trên logo & thẻ đăng nhập
   - Giữ nguyên các hiệu ứng nhỏ khác (nút nhấn, liên kết)
   ============================================================ */
body.auth-colorful-body .cf-card,
body.auth-colorful-body .cf-card .cf-logo,
body.auth-colorful-body .cf-card .cf-logo img,
body.auth-colorful-body .cf-card .cf-logo-3d-img{animation: none !important;
}
body.auth-colorful-body .cf-card .cf-logo,
body.auth-colorful-body .cf-card .cf-logo img,
body.auth-colorful-body .cf-card .cf-logo-3d-img{transition: none !important;transform: none !important;
}
body.auth-colorful-body .cf-card .cf-logo:hover,
body.auth-colorful-body .cf-card .cf-logo img:hover,
body.auth-colorful-body .cf-card .cf-logo-3d-img:hover{transform: none !important;
}
/* Nền trang trí không nhấp nháy / không phóng to */
body.auth-colorful-body .color-dots,
body.auth-colorful-body .auth-bg-img{animation: none !important;
}
