@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #d4884a;
  --primary-hover: #b8753d;
  --bg-page: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --input-bg: #ffffff;
  --input-border: #e2e8f0;
  --card-bg: #ffffff;
  --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
}

body, html {
  height: 100%;
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.box-signin {
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 40px 20px !important;
  background: 
    radial-gradient(at 0% 0%, rgba(212, 136, 74, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
    var(--bg-page) !important;
  position: relative !important;
}

.box-container-wisdom {
  width: 100% !important;
  max-width: 440px !important;
  margin: 0 auto;
}

.box-login-wisdom {
  background: var(--card-bg);
  border-radius: 32px;
  padding: 56px 48px !important;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0,0,0,0.02);
  width: 100% !important;
  box-sizing: border-box !important;
}

.images-logo {
  text-align: center;
  margin-bottom: 40px;
}

.images-logo h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin: 0;
}

.images-logo img {
  max-height: 80px;
  width: auto;
  margin-bottom: 20px;
}

.input-container {
  position: relative !important;
  margin-bottom: 25px !important;
  width: 100% !important;
  display: block !important;
}

.input-container input,
.input-container select {
  width: 100% !important;
  height: 56px !important;
  background: var(--input-bg) !important;
  border: 1.5px solid var(--input-border) !important;
  border-radius: 14px !important;
  padding: 0 16px 0 48px !important; /* Balanced padding */
  color: var(--text-main) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  outline: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  line-height: normal !important;
}

.input-container select {
    cursor: pointer !important;
}

.input-container input:focus,
.input-container select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(212, 136, 74, 0.08) !important;
  background: #fff !important;
}

/* Modern "Badge-style" Floating Label (Jumps to Border) */
.input-container .label {
  position: absolute !important;
  left: 48px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--text-muted) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  pointer-events: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 10 !important;
  background: transparent !important;
  padding: 0 4px !important;
}

.input-container input:focus ~ .label,
.input-container input.has-value ~ .label,
.input-container select:focus ~ .label,
.input-container select.has-value ~ .label {
  top: 0 !important;
  left: 14px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
  background: #ffffff !important;
  border-radius: 4px !important;
  padding: 0 10px !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  transform: translateY(-50%) !important; /* sit precisely on border */
}

.input-container::before {
  position: absolute !important;
  left: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-family: 'Font Awesome 5 Free' !important;
  font-weight: 900 !important;
  color: #94a3b8 !important;
  font-size: 16px !important;
  pointer-events: none !important;
  z-index: 5 !important;
  transition: all 0.2s ease !important;
}

/* Specific Icons - Restore Contents */
.form-name-field::before { content: '\f007' !important; }
.form-phone-field::before { content: '\f879' !important; }
.form-location-field::before { content: '\f3c5' !important; }
.form-username-field::before { content: '\f2bd' !important; }
.form-password-field::before { content: '\f023' !important; }
.form-referral-field::before { content: '\f0c0' !important; }

.toggle-password {
  position: absolute !important;
  right: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  padding: 10px !important;
}

.toggle-password:hover {
  color: var(--primary) !important;
}

.ghichu {
  display: flex;
  align-items: flex-start;
  margin: 10px 0 24px 0;
  cursor: pointer;
}

.ghichu input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  margin-right: 12px;
  margin-top: 1px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.ghichu input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.ghichu input[type="checkbox"]:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 10px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ghichu label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
  cursor: pointer;
}

.btn-dangnhap-wisdom {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px -5px rgba(212, 136, 74, 0.4);
  margin-bottom: 20px;
}

.btn-dangnhap-wisdom:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(212, 136, 74, 0.5);
  filter: brightness(1.1);
}

.btn-dangky a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  background: #f8fafc;
}

.btn-dangky a:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--primary);
}

.quenmk {
  margin-top: 24px;
  text-align: center;
}

.quenmk a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.quenmk a:hover {
  color: var(--primary);
}

.invalid-alert {
  font-size: 12px;
  color: #ef4444;
  margin-top: 5px;
  font-weight: 500;
  margin-bottom: 15px;
}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px white inset !important;
  -webkit-text-fill-color: var(--text-main) !important;
}

* {
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .box-login-wisdom {
    padding: 48px 24px !important;
    border-radius: 24px;
  }
}
