/* ===== Auth Pages Styles ===== */
.auth-wrap {
  max-width: 480px;
  margin: 30px auto;
  padding: 0 16px;
}
.auth-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  overflow: hidden;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #7f8c8d;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.auth-tab:hover { color: #1a5276; background: rgba(26,82,118,0.04); }
.auth-tab.active {
  color: #1a5276;
  border-bottom-color: #1a5276;
  background: rgba(26,82,118,0.04);
}
.auth-body {
  padding: 24px 28px;
}
.auth-body h2 {
  font-size: 16px;
  color: #1a5276;
  margin: 0 0 4px;
}
.auth-body .subtitle {
  font-size: 12px;
  color: #7f8c8d;
  margin: 0 0 18px;
}
.auth-field {
  margin-bottom: 12px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
  font-weight: 500;
}
.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border 0.2s;
  background: #fff;
}
.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  border-color: #8bb7d6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(139,183,214,0.15);
}
.auth-field .hint {
  font-size: 11px;
  color: #999;
  margin-top: 3px;
}
.field-error {
  font-size: 11px;
  color: #e74c3c;
  margin-top: 2px;
  display: none;
}
.field-error.show {
  display: block;
}

.auth-field .error-text {
  font-size: 11px;
  color: #e74c3c;
  margin-top: 3px;
  display: none;
}
.auth-field.has-error input {
  border-color: #e74c3c;
}
.auth-field.has-error .error-text {
  display: block;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.auth-btn {
  width: 100%;
  padding: 9px 0;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.auth-btn-primary {
  background: #1a5276;
  color: #fff;
}
.auth-btn-primary:hover { background: #154360; }
.auth-btn-primary:disabled{opacity:0.5;cursor:default;}
.auth-btn-primary:disabled { opacity: 0.5; cursor: default; }
.auth-btn-danger {
  background: #e74c3c;
  color: #fff;
}
.auth-btn-danger:hover { background: #c0392b; }
.auth-btn-outline {
  background: transparent;
  border: 1px solid #ddd;
  color: #555;
}
.auth-btn-outline:hover { background: #f5f5f5; }
.auth-btn-method {
  background: #2e86c1;
  color: #fff;
  margin-bottom: 6px;
  width: 100%;
}
.auth-btn-method:hover { background: #2471a3; }
.auth-link {
  text-align: center;
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 14px;
}
.auth-link a {
  color: #1a5276;
  text-decoration: none;
}
.auth-link a:hover { text-decoration: underline; }
.auth-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 16px 0;
}
.auth-error-msg {
  background: #fce8e6;
  color: #e74c3c;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  display: none;
}
.auth-error-msg.show { display: block; }
.auth-success-msg {
  background: #e8f5e9;
  color: #27ae60;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  display: none;
}
.auth-success-msg.show { display: block; }

/* Profile specific */
.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}
.profile-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a5276, #2e86c1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-info h3 {
  font-size: 16px;
  margin: 0;
  color: #2c3e50;
}
.profile-info .pmeta {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 2px;
}
.profile-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.profile-stat {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  flex: 1;
  min-width: 70px;
}
.profile-stat .num {
  font-size: 18px;
  font-weight: 700;
  color: #1a5276;
}
.profile-stat .lbl {
  font-size: 11px;
  color: #7f8c8d;
}
.profile-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a5276;
  margin: 16px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

/* Toast */
.auth-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 2000;
  display: none;
}
.auth-toast.show { display: block; }
.auth-toast.error { background: #e74c3c; }
.auth-toast.success { background: #27ae60; }

/* ===== SMS Phone Verify Styles ===== */
.sms-phone-display {
  font-size: 18px;
  font-weight: 700;
  color: #1a5276;
  letter-spacing: 2px;
  padding: 8px 12px;
  background: #e8f4ff;
  border-radius: 6px;
  text-align: center;
}
.sms-phone-verify {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sms-phone-prefix,
.sms-phone-suffix {
  font-size: 18px;
  font-weight: 700;
  color: #1a5276;
  padding: 8px 6px;
  background: #f0f0f0;
  border-radius: 6px;
  min-width: 40px;
  text-align: center;
  letter-spacing: 2px;
}
.sms-mid4-input {
  width: 100px !important;
  font-size: 20px !important;
  letter-spacing: 6px;
  text-align: center;
  font-weight: 700;
}
.auth-link a.disabled {
  color: #999 !important;
  cursor: default !important;
  text-decoration: none !important;
}
.sms-info-box {
  font-size: 16px;
  font-weight: 700;
  color: #1a5276;
  padding: 8px 12px;
  background: #fff3e0;
  border-radius: 6px;
  text-align: center;
}
.sms-phone-masked {
  font-size: 18px;
  font-weight: 700;
  color: #1a5276;
  letter-spacing: 2px;
  padding: 8px 12px;
  background: #e8f4ff;
  border-radius: 6px;
  text-align: center;
}
.sms-confirm-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.8;
}
.sms-confirm-box p { margin: 4px 0; }

/* ===== Email Verify Styles ===== */
.email-masked-list {
  background: #e8f4ff;
  border-radius: 6px;
  padding: 10px 14px;
}
.email-masked-row {
  display: flex;
  align-items: center;
  margin: 4px 0;
}

/* Selectable masked email rows */
.email-masked-selectable {
  cursor: pointer;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.email-masked-selectable:hover {
  background: #d4eaff;
  border-color: #a0c4e8;
}
.email-masked-row.selected {
  background: #d4edda;
  border-color: #4caf50;
}

/* Selection dot indicator */
.email-select-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  border: 2px solid #aaa;
  margin-right: 10px;
  transition: all 0.2s ease;
  vertical-align: middle;
}
.email-masked-row.selected .email-select-dot {
  background: #4caf50;
  border-color: #4caf50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}
.email-masked-item {
  font-size: 16px;
  font-weight: 700;
  color: #1a5276;
  letter-spacing: 1px;
  background: #f0f0f0;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
}
.email-verify-input {
  display: flex;
  align-items: center;
}
.email-full-input {
  width: 100% !important;
  font-size: 14px !important;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 500px) {
  .auth-body { padding: 16px; }
  .auth-row { grid-template-columns: 1fr; }
  .sms-phone-verify { flex-wrap: wrap; justify-content: center; }
}
