/* =========================================================
   AUTH PAGE STYLESHEET (minimal white theme + icons + avatar)
   Target: frontend/views/auth/login.php
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Khmer:wght@400;500;600&display=swap');

/* ===== Reset / Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Noto Sans Khmer','Khmer OS Siemreap',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: #ffffff;                  /* plain white background */
  color: #1b1b33;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.45;
}

/* ===== Wrapper & Card (compact) ===== */
.wrap {
  width: 100%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  background: #fff;
  border: 1px solid #e8eaf5;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 360px;                     /* compact width */
  padding: 26px 24px 28px;
  text-align: center;
  animation: fadeIn 0.6s ease;
}

/* ===== Avatar (circle) ===== */
.avatar-box {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  animation: fadeInDown 0.7s ease;
}
.avatar-box img {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2px solid #4a68ff;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(74,104,255,0.22);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  animation: pulse 2.8s infinite ease-in-out;
  cursor: default;
}
.avatar-box img:hover {
  transform: scale(1.06);
  box-shadow: 0 0 14px rgba(74,104,255,0.35);
}

/* ===== Titles (optional; hidden in minimal mode if not used) ===== */
.title {
  font-size: 1.38rem;
  font-weight: 600;
  margin: 2px 0 4px;
  color: #1b1b33;
}
.subtitle {
  font-size: 0.94rem;
  color: #61647a;
  margin: 0 0 18px;
}

/* ===== Form fields ===== */
.field { margin-bottom: 14px; text-align: left; }
.control { position: relative; }

/* Labels (not shown in minimal placeholder mode) */
.flabel {
  position: absolute;
  top: -9px;
  left: 12px;
  background: transparent;              /* transparent chip */
  padding: 0 4px;
  font-size: 13px;
  color: #003366;
  font-weight: 500;
}

/* Inputs (white fill; subtle borders) */
.input {
  width: 100%;
  padding: 11px 13px;
  font-size: 14.5px;
  border: 1px solid #cbd3ff;
  border-radius: 8px;
  background: #ffffff;                  /* keep white */
  color: #111;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:hover { border-color: #aebaff; }
.input:focus {
  border-color: #4a68ff;
  box-shadow: 0 0 0 3px rgba(74,104,255,0.14);
}

/* Left icons inside inputs */
.control.has-icon { position: relative; }
.lead-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b6f86;
  font-size: 16px;
  pointer-events: none;
}
.control.has-icon .input {
  padding-left: 36px;                   /* space for left icon */
}

/* Right eye button (password toggle) */
.trailing { position: relative; }
.trailing button {
  border: none;
  background: transparent;
  position: absolute;
  right: 10px;
  top: 7px;
  cursor: pointer;
  color: #6b6f86;
  padding: 4px;
  line-height: 0;
}
.trailing button:hover { color: #2a4fff; }

/* ===== Remember + links ===== */
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.chk { font-size: 13.5px; color: #363b54; }
.link {
  color: #2a4fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
}
.link:hover { text-decoration: underline; }

/* ===== Buttons ===== */
.actions { margin-top: 12px; }
.btn {
  width: 100%;
  padding: 10.5px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-primary {
  background: #4a68ff;
  color: #fff;
  border-color: #4a68ff;
  box-shadow: 0 4px 10px rgba(74,104,255,0.28);
}
.btn-primary:hover {
  background: #3d57da;
  border-color: #3d57da;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(74,104,255,0.32);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(74,104,255,0.28);
}

.under {
  text-align: center;
  margin-top: 10px;
  font-size: 13.5px;
}

/* ===== Errors ===== */
.errors { margin-bottom: 12px; }
.error {
  background: #fff5f5;                  /* white-ish with hint of red */
  color: #a30000;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ffcdcd;
  font-size: 14px;
  text-align: center;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%   { transform: scale(1);    box-shadow: 0 0 8px rgba(74,104,255,0.22); }
  50%  { transform: scale(1.04); box-shadow: 0 0 14px rgba(74,104,255,0.34); }
  100% { transform: scale(1);    box-shadow: 0 0 8px rgba(74,104,255,0.22); }
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .card { max-width: 330px; padding: 22px 18px 24px; }
  .title { font-size: 1.3rem; }
  .input { font-size: 14px; }
}
